﻿using Abp.Application.Services.Dto;
using Abp.AutoMapper;
using FwProject.Product.Dto;
using FwProject.ShoppingMall.Com;
using FwProject.ShoppingMall.Product;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace FwProject.Com.Dto
{
    /// <summary>
    /// 规格模型
    /// </summary>
    [AutoMap(typeof(Spce))]
    public class SpceEnterDto
    {
        /// <summary>
        /// 规格名称
        /// </summary>
        [Display(Name = "规格名称")]
        [Required(ErrorMessage = "{0}不能为空")]
        [StringLength(Spce.StringLength, ErrorMessage = "不能超过{1}个字符")]
        public string SpceName { get; set; }
        /// <summary>
        /// 规格类型
        /// </summary>
        [Display(Name = "规格类型")]
        public SpceTypeEnum SpceType { get; set; }

        /// <summary>
        /// 规格备注
        /// </summary>
        [Display(Name = "规格备注")]
        public string SpceNote { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        [Display(Name = "排序")]
        public int Orders { get; set; } = 0;

        /// <summary>
        /// 规格值模型
        /// </summary>
        public List<ProductSpcevalueDto> ProductSpcevalues { get; set; }

    }
    /// <summary>
    /// 规格值dto模型
    /// </summary>
    [AutoMap(typeof(ProductSpcevalue))]
    public class ProductSpcevalueDto : EntityDto<Guid>
    {
        /// <summary>
        /// 规格值
        /// </summary>
        public string Spcevalue { get; set; }
        /// <summary>
        /// 图片
        /// </summary>
        public string Spcevalueico { get; set; }
    }
}
